<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let p1 = Promise.resolve('521')
        // 如果传入的参数为 非promise类型的对象,则返回的结果为成功的promise对象
        // 如果传入的参数为 promise对象 则参数的结果决定了 resolve 的结果
        let p2 = Promise.resolve(new Promise((resolve, reject) => {
            resolve('ok')        
        }))
        console.log(p1)
        console.log(p2)
    </script>
</body>
</html>